package com.example.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@Schema(description = "帖子信息")
public class Article {
    private Long id;

    @Schema(description = "帖子所属板块id")
    private Long boardId;

    @Schema(description = "帖子作者id")
    private Long userId;

    @Schema(description = "帖子标题")
    private String title;

    @Schema(description = "帖子访问量")
    private Integer visitCount;

    @Schema(description = "帖子回复量")
    private Integer replyCount;

    @Schema(description = "帖子点赞量")
    private Integer likeCount;

    @Schema(description = "帖子状态，0正常，1禁用")
    private Byte state;

    @Schema(description = "帖子正文")
    private String content;

    private Byte deleteState;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    //关联的用户信息
    private User user;
    //关联的板块信息
    private Board board;

    @Schema(description = "帖子是否是作者本人")
    private Boolean isOwn; //默认不是作者本人


}